<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加管理员</title>
<script type="text/javascript" src="js/jquery-3.1.0.js"></script>
<script type="text/javascript">
	function validate(){
		var user=$("input[name=username]").val();
		var phone=$("input[name=phone]").val();
		var password=$("input[name=password]").val();
		var password1=$("input[name=password1]").val();
		 if(password != password1){
			alert("两次密码输入不一致");
			return false
		}
		
	}
	
</script>
<style type="text/css">
* {
	margin: 0px;
	padding: 0px;
}
body{
background: #e8e8e8;
}
.t1 {
	float: right;
	height: 26px;
	line-height: 26px;
	padding: 0 10px 0 23px;
	background: #0099FF;
	border-radius: 3px;
	color: #fff;
	font-size: 13px;
	font-weight: normal;
	text-align: center;
	cursor: pointer;
	text-decoration: none;
	margin-right: 20px;
}
.t5 {
	background: #e8e8e8;
	border: 0px red solid;
	height: 70px;
}

.t6 {
	padding-top: 19px;
	font-size: 18px;
	border-bottom: 1px solid #ccc;
}
.main-div {
    background: #f3f3f3 url("../images/th_bg.gif") repeat-x;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    padding: 2px;
}
.main-div table {
    background: #FFF;
    border-top: 10px solid #FFF;
    border-bottom: 10px solid #FFF;
    width: 100%;
}
tr {
    display: table-row;
    vertical-align: inherit;
    border-color: inherit;
}
td.label {
    text-align: right;
    vertical-align: top;
    font-weight: bold;
    padding: 5px 1em;
    width: 30%;
    line-height: 30px;
}
input.button {
    padding: 5px 15px 5px;
    margin: 2px 2px;
    border: none;
    background: #0099FF;
    color: #FFF;
    cursor: pointer;
    border-radius: 3px;
}
p, td, div {
    font: 12px Microsoft Yahei, "sans-serif", "Arial", "Verdana";
}
span.require-field {
    margin-left: 1em;
    font: 12px verdana;
    color: #FF0000;
}
</style>
</head>
<body>
<div class="t5">
		<h1 class="t6">
			小熊猫 管理中心-添加管理员 <a href="AdminServlet?curpage=1&pagesize=5" class="t1">管理员列表</a>
		</h1>
	</div>

	<div class="main-div">
<form  action="AdminRegister" method="post" name="theForm" onsubmit="return validate()">
<table width="100%">
  <tbody><tr>
    <td class="label">用户名:</td>
    <td><input name="user" value="${user}" class="t66" placeholder=""  pattern="^^[a-zA-Z0-9]{6,18}$" required oninvalid="setCustomValidity('用户名由中英文组成，长度在6到18之间');" oninput="setCustomValidity('');"><span class="require-field">*</span></td>
    <td>${error}</td>
  </tr>
    <tr>
    <td class="label">手机号码:</td>
    <td><input  name="phone" value="${phone}" class="t66" placeholder="" pattern="^1[3|5|7|8][0-9]{9}$" required oninvalid="setCustomValidity('请输入正确的电话');" oninput="setCustomValidity('');"><span class="require-field">*</span></td>
  </tr>
    <tr>
    <td class="label">登录密码:</td>
    <td><input type="password" name="password" id="password" class="t66" placeholder="" pattern="^[a-zA-Z0-9]{6,18}$" required oninvalid="setCustomValidity('密码长度在6到18位之间');" oninput="setCustomValidity('');"><span class="require-field">*</span></td>
  </tr>
  <tr>
    <td class="label">确认密码:</td>
    <td><input type="password" name="password1" id="password1" class="t66" placeholder="" pattern="^[a-zA-Z0-9]{6,18}$" required oninvalid="setCustomValidity('密码长度在6到18位之间');" oninput="setCustomValidity('');"><span class="require-field">*</span></td>
  </tr>

        <tr>
        <td></td>
    <td colspan="" align="left">
      <input type="submit" value=" 确定 " class="button">
      <input type="reset" value=" 重置 " class="button">
    </td>
  </tr>
</tbody></table>

</form>
</div>
</body>
</html>